package Message;

import javax.json.bind.annotation.JsonbNumberFormat;
import javax.json.bind.annotation.JsonbProperty;


/**
 * @author liushan
 * Created by liushan on 2019-04-16.
 *
 *
 * @JsonbProperty - 用于指定自定义字段名称
 * @JsonbTransient - 当我们想要在反序列化/序列化期间忽略该字段时
 * @JsonbDateFormat - 当我们想要定义日期的显示格式时
 * @JsonbNumberFormat - 用于指定数值的显示格式
 * @JsonbNillable - 用于启用空值的序列化
 */
@SuppressWarnings("unused")
public class StuMessageDTO {

    // 为了使用jsonb,必须有一个空的默认构造方法
    public StuMessageDTO() {

    }

    public StuMessageDTO(String username, String name, String group, String openid, String wx_openid, String faculty, String faculty_title) {
        this.username = username;
        this.name = name;
        this.group = group;
        this.openid = openid;
        this.wx_openid = wx_openid;
        this.faculty = faculty;
        this.faculty_title = faculty_title;
    }
    private int id;

    @JsonbProperty("username")
    private String username;

    @JsonbProperty("name")
    private String name;

    @JsonbProperty("group")
    private String group;

    @JsonbProperty("openid")
    private String openid;

    @JsonbProperty("wx_openid")
    private String wx_openid;

    @JsonbProperty("faculty")
    private String faculty;

    @JsonbProperty("faculty_title")
    private String faculty_title;

    @JsonbNumberFormat(locale = "en_US", value = "#0.0")
    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getGroup() {
        return group;
    }

    public void setGroup(String group) {
        this.group = group;
    }

    public String getOpenid() {
        return openid;
    }

    public void setOpenid(String openid) {
        this.openid = openid;
    }

    public String getWx_openid() {
        return wx_openid;
    }

    public void setWx_openid(String wx_openid) {
        this.wx_openid = wx_openid;
    }

    public String getFaculty() {
        return faculty;
    }

    public void setFaculty(String faculty) {
        this.faculty = faculty;
    }

    public String getFaculty_title() {
        return faculty_title;
    }

    public void setFaculty_title(String faculty_title) {
        this.faculty_title = faculty_title;
    }
}